import static org.junit.Assert.*;

import org.junit.Test;


public class PrintICSTest {
	PrintICS tester;

	@Test
	public void testSetVersion() {
		tester = new PrintICS();
		tester.setVersion("Test Version");
		assertTrue("version not properly set", tester.getVersion().equals("VERSION:Test Version"));
		
		tester.setVersion("Test Version Fail");
		assertFalse("version not properly set", tester.getVersion().equals("VERSION:Fail"));
	}

	@Test
	public void testSetClassification() {
		tester = new PrintICS();
		tester.setClassification("Test Classification");
		assertTrue("classification not properly set", tester.getClassification().equals("BEGIN:Test Classification"));
		assertTrue("classificationEnd not properly set", tester.getClassificationEnd().equals("END:Test Classification"));
		
		tester.setClassification("Test Classification Fail");
		assertFalse("classification not properly set", tester.getClassification().equals("BEGIN:Fail"));
		assertFalse("classificationEnd not properly set", tester.getClassificationEnd().equals("END:Fail"));
	}

	@Test
	public void testSetComment() {
		tester = new PrintICS();
		tester.setComment("Test Comment");
		assertTrue("comment not properly set", tester.getComment().equals("COMMENT:Test Comment"));
		
		tester.setComment("Test Comment Fail");
		assertFalse("comment not properly set", tester.getComment().equals("COMMENT:Fail"));
	}

	@Test
	public void testSetLocation() {
		tester = new PrintICS();
		tester.setLocation("Test Location");
		assertTrue("location not properly set", tester.getLocation().equals("LOCATION:Test Location"));
		
		tester.setLocation("Test Location Fail");
		assertFalse("location not properly set", tester.getLocation().equals("LOCATION:Fail"));
	}

	@Test
	public void testSetResources() {
		tester = new PrintICS();
		tester.setResources("Test Resources");
		assertTrue("resources not properly set", tester.getResources().equals("RESOURCES:Test Resources"));
		
		tester.setResources("Test Resources Fail");
		assertFalse("resources not properly set", tester.getResources().equals("RESOURCES:Fail"));
	}

	@Test
	public void testSetDTSTART() {
		tester = new PrintICS();
		tester.setDTSTART("Test DTSTART");
		assertTrue("DTSTART not properly set", tester.getDTSTART().equals("DTSTART:Test DTSTART"));
		
		tester.setDTSTART("Test DTSTART Fail");
		assertFalse("DTSTART not properly set", tester.getDTSTART().equals("DTSTART:Fail"));
	}

	@Test
	public void testSetDTEND() {
		tester = new PrintICS();
		tester.setDTEND("Test DTEND");
		assertTrue("DTEND not properly set", tester.getDTEND().equals("DTEND:Test DTEND"));
		
		tester.setDTEND("Test DTEND Fail");
		assertFalse("DTEND not properly set", tester.getDTEND().equals("DTEND:Fail"));
	}

	@Test
	public void testSetTimeZone() {
		tester = new PrintICS();
		tester.setTimeZone("Test TimeZone");
		assertTrue("TimeZone not properly set", tester.getTimeZone().equals("TZID:Test TimeZone"));
		
		tester.setTimeZone("Test TimeZone Fail");
		assertFalse("TimeZone not properly set", tester.getTimeZone().equals("TZID:Fail")); 
	}

	@Test
	public void testSetRecurring() {
		tester = new PrintICS();
		tester.setRecurring("Test Recurring");
		assertTrue("Recurring not properly set", tester.getRecurring().equals("Test Recurring"));
		
		tester.setRecurring("Test Recurring Fail");
		assertFalse("Recurring not properly set", tester.getRecurring().equals("Fail"));
	}

}
